/**
 *
 * @param {string} type 按钮类型
 * @param {string} disabled 按钮失效状态
 * @returns
 */

const Button = (argv: any) => {
    if (argv.disabled) {
        return (
            <button disabled type='button' className={`ant-btn ant-btn-${argv.type} ${argv.className}`} style={argv.style} onClick={argv.onClick}>
                <span>{argv.children}</span>
            </button>
        )
    } else {
        return (
            <button type='button' className={`ant-btn ant-btn-${argv.type} ${argv.className}`} style={argv.style} onClick={argv.onClick}>
                <span>{argv.children}</span>
            </button>
        )
    }
}

Button.defaultProps = {
    type: 'default'
}

export default Button
